package com.lezhi.socialgram.model.sys;

import com.lezhi.socialgram.annotation.Table;
import com.lezhi.socialgram.util.JsonUtils;

import java.util.List;

/**
 * Created by daizhen on 2017/4/13.
 */
@Table(prefix = "t_user_hobby_")
public class UserHobby {

    private String table;

    private Long userId;

    private List<String> sport;

    private String sportStr;

    private List<String> music;

    private String musicStr;

    private List<String> food;

    private String foodStr;

    private List<String> movie;

    private String movieStr;

    public String getTable() {
        return table;
    }

    public void setTable(String table) {
        this.table = table;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public List<String> getSport() {
        return sport;
    }

    public void setSport(List<String> sport) {
        this.sport = sport;
    }

    public List<String> getMusic() {
        return music;
    }

    public void setMusic(List<String> music) {
        this.music = music;
    }

    public List<String> getFood() {
        return food;
    }

    public void setFood(List<String> food) {
        this.food = food;
    }

    public List<String> getMovie() {
        return movie;
    }

    public void setMovie(List<String> movie) {
        this.movie = movie;
    }

    public String getSportStr() {
        return JsonUtils.objectToJson(sport);
    }

    public void setSportStr(String sportStr) {
        this.sportStr = sportStr;
        this.sport = JsonUtils.jsonToList(sportStr, String.class);
    }

    public String getMusicStr() {
        return JsonUtils.objectToJson(music);
    }

    public void setMusicStr(String musicStr) {
        this.musicStr = musicStr;
        this.music = JsonUtils.jsonToList(musicStr, String.class);
    }

    public String getFoodStr() {
        return JsonUtils.objectToJson(food);
    }

    public void setFoodStr(String foodStr) {
        this.foodStr = foodStr;
        this.food = JsonUtils.jsonToList(foodStr, String.class);
    }

    public String getMovieStr() {
        return JsonUtils.objectToJson(movie);
    }

    public void setMovieStr(String movieStr) {
        this.movieStr = movieStr;
        this.movie = JsonUtils.jsonToList(movieStr, String.class);
    }
}
